package com.toivan.mt.fragment;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.shizhefei.fragment.LazyFragment;
import com.toivan.mt.R;
import com.toivan.mt.adapter.MtMagicFilterAdapter;
import com.toivan.mt.model.MtMagicFilterEnum;
import com.toivan.sdk.MtSDK;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MtMagicFilterFragment extends LazyFragment {
    private List<MtMagicFilterEnum> list = new ArrayList<>();


    @Override
    protected void onCreateViewLazy(Bundle savedInstanceState) {
        super.onCreateViewLazy(savedInstanceState);

        setContentView(R.layout.fragment_recyclerview);

        list.clear();
        list.addAll(Arrays.asList(MtMagicFilterEnum.values()));

        RecyclerView filterRV = (RecyclerView) findViewById(R.id.recyclerView);
        MtMagicFilterAdapter adapter = new MtMagicFilterAdapter(list);
        filterRV.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
        filterRV.setAdapter(adapter);
    }



}


